package com.spring.sunflower.common

import com.spring.sunflower.base.BaseObserver
import com.spring.sunflower.base.BasePresenter
import com.spring.sunflower.bean.VideoPlayBean

/**
 * Created by Kevin on 2021/8/22<br/>
 *
 * Describe:<br/>
 */
class VideoPlayPresenter(baseView: CommonContract.VideoPlayView) :
    BasePresenter<CommonContract.VideoPlayView>(baseView) {
    fun getVideoList(userId: String, pageIndex: String) {
        val observable =
            requestDataSource.requestVideoList(userId, pageIndex)
        addDisposable(observable, object : BaseObserver<VideoPlayBean>() {
            override fun onSuccess(bean: VideoPlayBean?) {
              baseView.showVideoList(bean!!.datas)
            }

            override fun onError(status: Int, msg: String?) {
            }

        })



    }
}